﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BonsaiScrum.Core.Persistance;
using NHibernate;
using BonsaiScrum.Core.Query;
using NHibernate.Criterion;

namespace BonsaiScrum.Data.Reporting
{
    public class NHibernateTaskReportingRepository : ITaskReportingRepository
    {
        private readonly ISession _session;

        public NHibernateTaskReportingRepository(ISession session)
        {
            _session = session;
        }

        public ICollection<TaskReport> GetTasksForStory(int storyId)
        {
            var tasks = _session.CreateCriteria<TaskReport>()
                .List<TaskReport>();

            return tasks;
        }
    }
}
